<template>
	<view class="user-container">
		<view class="user-info">
			<view class="user-avatar">
				<image :src="userInfo.suggestInitiatorAvatar"></image>
			</view>
			<view class="user-txt">
				<view class="user-name">
					{{ userInfo.suggestInitiatorName }}
				</view>
				<view class="user-time">
					{{ userInfo.suggestCreateDate }}
				</view>
			</view>
		</view>
		<view class="status">
			{{ userInfo.suggestGroupStatus }}
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			userInfo: {
				type: Object
			}
		}
	}
</script>

<style scoped lang="scss">
	.user-container {
		width: 100%;
		display: flex;
		flex-direction: row;
		height: 120rpx;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 30rpx;

		.user-info {
			display: flex;
			justify-content: flex-start;
			width: calc(100% - 80rpx);
			height: 100%;

			.user-avatar {
				width: 120rpx;
				height: 120rpx;
				border-radius: 50%;
				overflow: hidden;
				margin-right: 20rpx;

				image {
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
			}

			.user-txt {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				align-items: flex-start;
				height: 100%;
				padding: 10rpx 0;
				box-sizing: border-box;

				.user-name {
					font-weight: 600;
					font-size: 30rpx;
					color: #434141;
					text-align: center;
					font-style: normal;
				}

				.user-time {
					font-family: Source Han Sans SC, Source Han Sans SC;
					font-weight: 400;
					font-size: 26rpx;
					color: #ABABAB;
					font-style: normal;
					text-transform: none;
				}
			}
		}

		.status {
			width: 160rpx;
			height: 50rpx;
			border-radius: 40rpx;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			justify-content: center;
			background: #FBE1D9;
			font-weight: 500;
			font-size: 24rpx;
			color: #AD2325;
			text-align: center;
			font-style: normal;
			text-transform: none;
		}
	}
</style>